﻿#include "npc.h"
#include<QDebug>
npc::npc()
{
    pix.load(":/RES/npc.jpg");
    pix=pix.scaled(100,100);
}
QRectF npc::boundingRect() const
{
    return QRectF(-pix.width()/2,-pix.height()/2,pix.width(),pix. height());
}
void npc::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,QWidget *widget)
{
    painter->drawPixmap(boundingRect().topLeft(),pix);
}
void npc::advance(int palse)
{
    if(collidingItems().count()>0)
    {
        //delete this;
    }

}
